home *** CD-ROM | disk | FTP | other *** search
Text File | 1992-01-15 | 44.6 KB | 1,275 lines |
- card_3903.xml
- <?xml version="1.0" encoding="utf-8" ?>
- <!DOCTYPE card PUBLIC "-//Apple, Inc.//DTD card V 2.0//EN" "" >
- <card>
- <id>3903</id>
- <filler1>0</filler1>
- <cantDelete> <false /> </cantDelete>
- <showPict> <true /> </showPict>
- <dontSearch> <false /> </dontSearch>
- <owner>4419</owner>
- <link rel="stylesheet" type="text/css" href="stylesheet_2096.css" />
- <part>
- <id>93</id>
- <type>button</type>
- <visible> <true /> </visible>
- <reserved5> 0 </reserved5>
- <reserved4> 0 </reserved4>
- <reserved3> 0 </reserved3>
- <reserved2> 0 </reserved2>
- <reserved1> 0 </reserved1>
- <enabled> <true /> </enabled>
- <rect>
- <left>27</left>
- <top>159</top>
- <right>331</right>
- <bottom>198</bottom>
- </rect>
- <style>shadow</style>
- <showName> <true /> </showName>
- <highlight> <false /> </highlight>
- <autoHighlight> <false /> </autoHighlight>
- <sharedHighlight> <true /> </sharedHighlight>
- <family>0</family>
- <titleWidth>0</titleWidth>
- <icon>0</icon>
- <textAlign>center</textAlign>
- <font>Chicago</font>
- <textSize>12</textSize>
- <textStyle>plain</textStyle>
- <name>Go</name>
- <script>on mouseUp
- StartDemonstration
- end mouseUp
-
- </script>
- </part>
- <part>
- <id>94</id>
- <type>button</type>
- <visible> <true /> </visible>
- <reserved5> 0 </reserved5>
- <reserved4> 0 </reserved4>
- <reserved3> 0 </reserved3>
- <reserved2> 0 </reserved2>
- <reserved1> 0 </reserved1>
- <enabled> <true /> </enabled>
- <rect>
- <left>337</left>
- <top>159</top>
- <right>485</right>
- <bottom>198</bottom>
- </rect>
- <style>shadow</style>
- <showName> <true /> </showName>
- <highlight> <false /> </highlight>
- <autoHighlight> <false /> </autoHighlight>
- <sharedHighlight> <true /> </sharedHighlight>
- <family>0</family>
- <titleWidth>0</titleWidth>
- <icon>0</icon>
- <textAlign>center</textAlign>
- <font>Chicago</font>
- <textSize>12</textSize>
- <textStyle>plain</textStyle>
- <name>Stop</name>
- <script>on mouseUp
- StopDemonstration
- end mouseUp
-
- </script>
- </part>
- <content>
- <layer>background</layer>
- <id>16</id>
- <text>Card 2 of 2</text>
- </content>
- <content>
- <layer>background</layer>
- <id>19</id>
- <text>ProgressWindoid Package -- HyperTalk code for Progress Windows</text>
- </content>
- <content>
- <layer>background</layer>
- <id>20</id>
- <text>The code in this card can be pasted into any stack, background, or card that wants to manage ProgressWindoids.
-
- There is also a quick demonstration of it which is accessed by the buttons below.</text>
- </content>
- <name></name>
- <script>•••••• ProgressWindoid Package
- •••••• by Chris Thorman, Apple Computer 1990
- ••••••
- •••••• Permission granted for use as long as this message appears.
-
- •••• CreateProgressWindoid
- ••••
- •••• Note: This handler avoids creating two windoids with the same
- •••• name. If there is an error, then a dialog box is presented.
- •••• All arguments except for the first two are optional.
-
- on CreateProgressWindoid Name, Loc, Width, Text, Fraction, Font, Size
-
- if there is not a window WindowName then
-
- put ProgressWindoid(Name, Loc, Width, Text, Fraction, Font, Size) ¬
- into XFCNResult
-
- if XFCNResult is not empty then
- answer XFCNResult
- exit CreateProgressWindoid
- end if
-
- end if
-
- show window Name
- end CreateProgressWindoid
-
- •••• ShowProgressInWindoid
- ••••
- •••• This handler updates a windoid that was created with
- •••• CreateProgressWindoid to show a new percentage of
- •••• completion. LowBound and HighBound are the numeric limits
- •••• that are to be represented in the Windoid. Count is a number
- •••• between LowBound and HighBound, inclusive, that represents
- •••• the completion level.
-
- on ShowProgressInWindoid WindoidName, LowBound, HighBound, Count
- set the fraction of window WindoidName to Count/(HighBound-LowBound)
- end ShowProgressInWindoid
-
- •••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••
- ••••• Demo Code ••••
- •••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••
-
- on idle
- ContinueDemonstration
- end idle
-
- on StartDemonstration
- global DoingDemonstration
- put true into DoingDemonstration
-
- -- create two windoids, one to count seconds, one to count minutes
- put the rect of target into TheRect -- the rect of the button hit by the user
- put item 1 of TheRect & "," & (item 2 of TheRect) into MVLoc
- put item 1 of TheRect & "," & (item 2 of TheRect + 80) into MHLoc
- put item 3 of TheRect - item 1 of TheRect into TheWidth
-
- CreateProgressWindoid "MouseH", MVLoc, TheWidth, "Mouse Horizontal Position"
- CreateProgressWindoid "MouseV", MHLoc, TheWidth, "Mouse Vertical Position"
-
- end StartDemonstration
-
- on ContinueDemonstration
- global DoingDemonstration
- if there is not a window "MouseH" or there is not a window "MouseV"
- then StopDemonstration
- if DoingDemonstration is true then
- ShowProgressInWindoid "MouseH", 0, width of card window, the mouseH
- ShowProgressInWindoid "MouseV", 0, height of card window, the mouseV
- end if
- end ContinueDemonstration
-
- on StopDemonstration
- global DoingDemonstration
- put false into DoingDemonstration
- if there is a window "MouseH" then close window "MouseH"
- if there is a window "MouseV" then close window "MouseV"
- end StopDemonstration
- </script>
- </card>
-
-
- card_3591.xml
- <?xml version="1.0" encoding="utf-8" ?>
- <!DOCTYPE card PUBLIC "-//Apple, Inc.//DTD card V 2.0//EN" "" >
- <card>
- <id>3591</id>
- <filler1>0</filler1>
- <cantDelete> <false /> </cantDelete>
- <showPict> <true /> </showPict>
- <dontSearch> <false /> </dontSearch>
- <owner>4419</owner>
- <link rel="stylesheet" type="text/css" href="stylesheet_2096.css" />
- <part>
- <id>45</id>
- <type>field</type>
- <visible> <true /> </visible>
- <dontWrap> <false /> </dontWrap>
- <dontSearch> <false /> </dontSearch>
- <sharedText> <false /> </sharedText>
- <fixedLineHeight> <true /> </fixedLineHeight>
- <autoTab> <false /> </autoTab>
- <lockText> <true /> </lockText>
- <rect>
- <left>20</left>
- <top>168</top>
- <right>116</right>
- <bottom>181</bottom>
- </rect>
- <style>opaque</style>
- <autoSelect> <false /> </autoSelect>
- <showLines> <false /> </showLines>
- <wideMargins> <false /> </wideMargins>
- <multipleLines> <false /> </multipleLines>
- <reservedFamily> 0 </reservedFamily>
- <titleWidth>0</titleWidth>
- <icon>0</icon>
- <textAlign>left</textAlign>
- <font>Geneva</font>
- <textSize>9</textSize>
- <textStyle>bold</textStyle>
- <textHeight>9</textHeight>
- <name>Label</name>
- <script>••••• Label field using Label Field Package •••••
-
- on mouseDown
- LabelFieldClick
- pass mouseDown
- end mouseDown
-
- ••••• Truncating & Style-Fixing field using Valid Entry Package •••••
-
- on closeField
- KeepOnlyVisibleLines
- UseTextStyleOfField
- pass closeField
- end closeField</script>
- </part>
- <part>
- <id>20</id>
- <type>field</type>
- <visible> <true /> </visible>
- <dontWrap> <false /> </dontWrap>
- <dontSearch> <false /> </dontSearch>
- <sharedText> <false /> </sharedText>
- <fixedLineHeight> <true /> </fixedLineHeight>
- <autoTab> <false /> </autoTab>
- <lockText> <true /> </lockText>
- <rect>
- <left>20</left>
- <top>185</top>
- <right>116</right>
- <bottom>197</bottom>
- </rect>
- <style>opaque</style>
- <autoSelect> <false /> </autoSelect>
- <showLines> <false /> </showLines>
- <wideMargins> <false /> </wideMargins>
- <multipleLines> <false /> </multipleLines>
- <reservedFamily> 0 </reservedFamily>
- <titleWidth>0</titleWidth>
- <icon>0</icon>
- <textAlign>left</textAlign>
- <font>Geneva</font>
- <textSize>9</textSize>
- <textStyle>bold</textStyle>
- <textHeight>9</textHeight>
- <name>Label</name>
- <script>••••• Label field using Label Field Package •••••
-
- on mouseDown
- LabelFieldClick
- pass mouseDown
- end mouseDown
-
- ••••• Truncating & Style-Fixing field using Valid Entry Package •••••
-
- on closeField
- KeepOnlyVisibleLines
- UseTextStyleOfField
- pass closeField
- end closeField</script>
- </part>
- <part>
- <id>41</id>
- <type>field</type>
- <visible> <true /> </visible>
- <dontWrap> <false /> </dontWrap>
- <dontSearch> <false /> </dontSearch>
- <sharedText> <false /> </sharedText>
- <fixedLineHeight> <true /> </fixedLineHeight>
- <autoTab> <false /> </autoTab>
- <lockText> <true /> </lockText>
- <rect>
- <left>20</left>
- <top>200</top>
- <right>116</right>
- <bottom>212</bottom>
- </rect>
- <style>opaque</style>
- <autoSelect> <false /> </autoSelect>
- <showLines> <false /> </showLines>
- <wideMargins> <false /> </wideMargins>
- <multipleLines> <false /> </multipleLines>
- <reservedFamily> 0 </reservedFamily>
- <titleWidth>0</titleWidth>
- <icon>0</icon>
- <textAlign>left</textAlign>
- <font>Geneva</font>
- <textSize>9</textSize>
- <textStyle>bold</textStyle>
- <textHeight>9</textHeight>
- <name>Label</name>
- <script>••••• Label field using Label Field Package •••••
-
- on mouseDown
- LabelFieldClick
- pass mouseDown
- end mouseDown
-
- ••••• Truncating & Style-Fixing field using Valid Entry Package •••••
-
- on closeField
- KeepOnlyVisibleLines
- UseTextStyleOfField
- pass closeField
- end closeField</script>
- </part>
- <part>
- <id>30</id>
- <type>field</type>
- <visible> <true /> </visible>
- <dontWrap> <false /> </dontWrap>
- <dontSearch> <false /> </dontSearch>
- <sharedText> <false /> </sharedText>
- <fixedLineHeight> <true /> </fixedLineHeight>
- <autoTab> <false /> </autoTab>
- <lockText> <true /> </lockText>
- <rect>
- <left>20</left>
- <top>216</top>
- <right>116</right>
- <bottom>228</bottom>
- </rect>
- <style>opaque</style>
- <autoSelect> <false /> </autoSelect>
- <showLines> <false /> </showLines>
- <wideMargins> <false /> </wideMargins>
- <multipleLines> <false /> </multipleLines>
- <reservedFamily> 0 </reservedFamily>
- <titleWidth>0</titleWidth>
- <icon>0</icon>
- <textAlign>left</textAlign>
- <font>Geneva</font>
- <textSize>9</textSize>
- <textStyle>bold</textStyle>
- <textHeight>9</textHeight>
- <name>Label</name>
- <script>••••• Label field using Label Field Package •••••
-
- on mouseDown
- LabelFieldClick
- pass mouseDown
- end mouseDown
-
- ••••• Truncating & Style-Fixing field using Valid Entry Package •••••
-
- on closeField
- KeepOnlyVisibleLines
- UseTextStyleOfField
- pass closeField
- end closeField</script>
- </part>
- <part>
- <id>61</id>
- <type>field</type>
- <visible> <true /> </visible>
- <dontWrap> <false /> </dontWrap>
- <dontSearch> <false /> </dontSearch>
- <sharedText> <false /> </sharedText>
- <fixedLineHeight> <true /> </fixedLineHeight>
- <autoTab> <false /> </autoTab>
- <lockText> <true /> </lockText>
- <rect>
- <left>20</left>
- <top>232</top>
- <right>116</right>
- <bottom>244</bottom>
- </rect>
- <style>opaque</style>
- <autoSelect> <false /> </autoSelect>
- <showLines> <false /> </showLines>
- <wideMargins> <false /> </wideMargins>
- <multipleLines> <false /> </multipleLines>
- <reservedFamily> 0 </reservedFamily>
- <titleWidth>0</titleWidth>
- <icon>0</icon>
- <textAlign>left</textAlign>
- <font>Geneva</font>
- <textSize>9</textSize>
- <textStyle>bold</textStyle>
- <textHeight>9</textHeight>
- <name>Label</name>
- <script>••••• Label field using Label Field Package •••••
-
- on mouseDown
- LabelFieldClick
- pass mouseDown
- end mouseDown
-
- ••••• Truncating & Style-Fixing field using Valid Entry Package •••••
-
- on closeField
- KeepOnlyVisibleLines
- UseTextStyleOfField
- pass closeField
- end closeField</script>
- </part>
- <part>
- <id>63</id>
- <type>field</type>
- <visible> <true /> </visible>
- <dontWrap> <false /> </dontWrap>
- <dontSearch> <false /> </dontSearch>
- <sharedText> <false /> </sharedText>
- <fixedLineHeight> <true /> </fixedLineHeight>
- <autoTab> <false /> </autoTab>
- <lockText> <true /> </lockText>
- <rect>
- <left>20</left>
- <top>248</top>
- <right>116</right>
- <bottom>260</bottom>
- </rect>
- <style>opaque</style>
- <autoSelect> <false /> </autoSelect>
- <showLines> <false /> </showLines>
- <wideMargins> <false /> </wideMargins>
- <multipleLines> <false /> </multipleLines>
- <reservedFamily> 0 </reservedFamily>
- <titleWidth>0</titleWidth>
- <icon>0</icon>
- <textAlign>left</textAlign>
- <font>Geneva</font>
- <textSize>9</textSize>
- <textStyle>bold</textStyle>
- <textHeight>9</textHeight>
- <name>Label</name>
- <script>••••• Label field using Label Field Package •••••
-
- on mouseDown
- LabelFieldClick
- pass mouseDown
- end mouseDown
-
- ••••• Truncating & Style-Fixing field using Valid Entry Package •••••
-
- on closeField
- KeepOnlyVisibleLines
- UseTextStyleOfField
- pass closeField
- end closeField</script>
- </part>
- <part>
- <id>65</id>
- <type>field</type>
- <visible> <true /> </visible>
- <dontWrap> <false /> </dontWrap>
- <dontSearch> <false /> </dontSearch>
- <sharedText> <false /> </sharedText>
- <fixedLineHeight> <true /> </fixedLineHeight>
- <autoTab> <false /> </autoTab>
- <lockText> <true /> </lockText>
- <rect>
- <left>20</left>
- <top>264</top>
- <right>116</right>
- <bottom>276</bottom>
- </rect>
- <style>opaque</style>
- <autoSelect> <false /> </autoSelect>
- <showLines> <false /> </showLines>
- <wideMargins> <false /> </wideMargins>
- <multipleLines> <false /> </multipleLines>
- <reservedFamily> 0 </reservedFamily>
- <titleWidth>0</titleWidth>
- <icon>0</icon>
- <textAlign>left</textAlign>
- <font>Geneva</font>
- <textSize>9</textSize>
- <textStyle>bold</textStyle>
- <textHeight>9</textHeight>
- <name>Label</name>
- <script>••••• Label field using Label Field Package •••••
-
- on mouseDown
- LabelFieldClick
- pass mouseDown
- end mouseDown
-
- ••••• Truncating & Style-Fixing field using Valid Entry Package •••••
-
- on closeField
- KeepOnlyVisibleLines
- UseTextStyleOfField
- pass closeField
- end closeField</script>
- </part>
- <part>
- <id>19</id>
- <type>field</type>
- <visible> <true /> </visible>
- <dontWrap> <false /> </dontWrap>
- <dontSearch> <false /> </dontSearch>
- <sharedText> <false /> </sharedText>
- <fixedLineHeight> <true /> </fixedLineHeight>
- <autoTab> <false /> </autoTab>
- <lockText> <true /> </lockText>
- <rect>
- <left>140</left>
- <top>305</top>
- <right>206</right>
- <bottom>318</bottom>
- </rect>
- <style>opaque</style>
- <autoSelect> <false /> </autoSelect>
- <showLines> <false /> </showLines>
- <wideMargins> <false /> </wideMargins>
- <multipleLines> <false /> </multipleLines>
- <reservedFamily> 0 </reservedFamily>
- <titleWidth>0</titleWidth>
- <icon>0</icon>
- <textAlign>left</textAlign>
- <font>Geneva</font>
- <textSize>9</textSize>
- <textStyle>bold</textStyle>
- <textHeight>9</textHeight>
- <name>Label</name>
- <script>••••• Label field using Label Field Package •••••
-
- on mouseDown
- LabelFieldClick
- pass mouseDown
- end mouseDown
-
- ••••• Truncating & Style-Fixing field using Valid Entry Package •••••
-
- on closeField
- KeepOnlyVisibleLines
- UseTextStyleOfField
- pass closeField
- end closeField</script>
- </part>
- <part>
- <id>44</id>
- <type>field</type>
- <visible> <true /> </visible>
- <dontWrap> <false /> </dontWrap>
- <dontSearch> <false /> </dontSearch>
- <sharedText> <false /> </sharedText>
- <fixedLineHeight> <true /> </fixedLineHeight>
- <autoTab> <false /> </autoTab>
- <lockText> <false /> </lockText>
- <rect>
- <left>118</left>
- <top>168</top>
- <right>342</right>
- <bottom>181</bottom>
- </rect>
- <style>rectangle</style>
- <autoSelect> <false /> </autoSelect>
- <showLines> <false /> </showLines>
- <wideMargins> <false /> </wideMargins>
- <multipleLines> <false /> </multipleLines>
- <reservedFamily> 0 </reservedFamily>
- <titleWidth>0</titleWidth>
- <icon>0</icon>
- <textAlign>left</textAlign>
- <font>Geneva</font>
- <textSize>9</textSize>
- <textStyle>plain</textStyle>
- <textHeight>9</textHeight>
- <name>Window Name</name>
- <script></script>
- </part>
- <part>
- <id>28</id>
- <type>field</type>
- <visible> <true /> </visible>
- <dontWrap> <false /> </dontWrap>
- <dontSearch> <false /> </dontSearch>
- <sharedText> <false /> </sharedText>
- <fixedLineHeight> <true /> </fixedLineHeight>
- <autoTab> <false /> </autoTab>
- <lockText> <false /> </lockText>
- <rect>
- <left>118</left>
- <top>184</top>
- <right>342</right>
- <bottom>197</bottom>
- </rect>
- <style>rectangle</style>
- <autoSelect> <false /> </autoSelect>
- <showLines> <false /> </showLines>
- <wideMargins> <false /> </wideMargins>
- <multipleLines> <false /> </multipleLines>
- <reservedFamily> 0 </reservedFamily>
- <titleWidth>0</titleWidth>
- <icon>0</icon>
- <textAlign>left</textAlign>
- <font>Geneva</font>
- <textSize>9</textSize>
- <textStyle>plain</textStyle>
- <textHeight>9</textHeight>
- <name>Loc</name>
- <script></script>
- </part>
- <part>
- <id>40</id>
- <type>field</type>
- <visible> <true /> </visible>
- <dontWrap> <false /> </dontWrap>
- <dontSearch> <false /> </dontSearch>
- <sharedText> <false /> </sharedText>
- <fixedLineHeight> <true /> </fixedLineHeight>
- <autoTab> <false /> </autoTab>
- <lockText> <false /> </lockText>
- <rect>
- <left>118</left>
- <top>200</top>
- <right>342</right>
- <bottom>213</bottom>
- </rect>
- <style>rectangle</style>
- <autoSelect> <false /> </autoSelect>
- <showLines> <false /> </showLines>
- <wideMargins> <false /> </wideMargins>
- <multipleLines> <false /> </multipleLines>
- <reservedFamily> 0 </reservedFamily>
- <titleWidth>0</titleWidth>
- <icon>0</icon>
- <textAlign>left</textAlign>
- <font>Geneva</font>
- <textSize>9</textSize>
- <textStyle>plain</textStyle>
- <textHeight>9</textHeight>
- <name>Text</name>
- <script></script>
- </part>
- <part>
- <id>29</id>
- <type>field</type>
- <visible> <true /> </visible>
- <dontWrap> <false /> </dontWrap>
- <dontSearch> <false /> </dontSearch>
- <sharedText> <false /> </sharedText>
- <fixedLineHeight> <true /> </fixedLineHeight>
- <autoTab> <false /> </autoTab>
- <lockText> <false /> </lockText>
- <rect>
- <left>118</left>
- <top>216</top>
- <right>342</right>
- <bottom>229</bottom>
- </rect>
- <style>rectangle</style>
- <autoSelect> <false /> </autoSelect>
- <showLines> <false /> </showLines>
- <wideMargins> <false /> </wideMargins>
- <multipleLines> <false /> </multipleLines>
- <reservedFamily> 0 </reservedFamily>
- <titleWidth>0</titleWidth>
- <icon>0</icon>
- <textAlign>left</textAlign>
- <font>Geneva</font>
- <textSize>9</textSize>
- <textStyle>plain</textStyle>
- <textHeight>9</textHeight>
- <name>Fraction</name>
- <script></script>
- </part>
- <part>
- <id>43</id>
- <type>button</type>
- <visible> <true /> </visible>
- <reserved5> 0 </reserved5>
- <reserved4> 0 </reserved4>
- <reserved3> 0 </reserved3>
- <reserved2> 0 </reserved2>
- <reserved1> 0 </reserved1>
- <enabled> <true /> </enabled>
- <rect>
- <left>15</left>
- <top>299</top>
- <right>134</right>
- <bottom>321</bottom>
- </rect>
- <style>roundrect</style>
- <showName> <true /> </showName>
- <highlight> <false /> </highlight>
- <autoHighlight> <false /> </autoHighlight>
- <sharedHighlight> <true /> </sharedHighlight>
- <family>0</family>
- <titleWidth>0</titleWidth>
- <icon>0</icon>
- <textAlign>center</textAlign>
- <font>Chicago</font>
- <textSize>12</textSize>
- <textStyle>plain</textStyle>
- <name>Simple Loop Test</name>
- <script>on mouseDown
- TestProgressWindoidLoop
- end mouseDown
- </script>
- </part>
- <part>
- <id>46</id>
- <type>button</type>
- <visible> <true /> </visible>
- <reserved5> 0 </reserved5>
- <reserved4> 0 </reserved4>
- <reserved3> 0 </reserved3>
- <reserved2> 0 </reserved2>
- <reserved1> 0 </reserved1>
- <enabled> <true /> </enabled>
- <rect>
- <left>295</left>
- <top>298</top>
- <right>415</right>
- <bottom>320</bottom>
- </rect>
- <style>roundrect</style>
- <showName> <true /> </showName>
- <highlight> <false /> </highlight>
- <autoHighlight> <false /> </autoHighlight>
- <sharedHighlight> <true /> </sharedHighlight>
- <family>0</family>
- <titleWidth>0</titleWidth>
- <icon>0</icon>
- <textAlign>center</textAlign>
- <font>Chicago</font>
- <textSize>12</textSize>
- <textStyle>plain</textStyle>
- <name>Mouse Track Test</name>
- <script>on mouseDown
- TestProgressWindoidMouse
- end mouseDown
- </script>
- </part>
- <part>
- <id>53</id>
- <type>button</type>
- <visible> <true /> </visible>
- <reserved5> 0 </reserved5>
- <reserved4> 0 </reserved4>
- <reserved3> 0 </reserved3>
- <reserved2> 0 </reserved2>
- <reserved1> 0 </reserved1>
- <enabled> <true /> </enabled>
- <rect>
- <left>278</left>
- <top>140</top>
- <right>336</right>
- <bottom>162</bottom>
- </rect>
- <style>roundrect</style>
- <showName> <true /> </showName>
- <highlight> <false /> </highlight>
- <autoHighlight> <false /> </autoHighlight>
- <sharedHighlight> <true /> </sharedHighlight>
- <family>0</family>
- <titleWidth>0</titleWidth>
- <icon>0</icon>
- <textAlign>center</textAlign>
- <font>Chicago</font>
- <textSize>12</textSize>
- <textStyle>plain</textStyle>
- <name>Show</name>
- <script>on mouseUp
- ShowProgressWindoid
- end mouseUp
- </script>
- </part>
- <part>
- <id>54</id>
- <type>button</type>
- <visible> <true /> </visible>
- <reserved5> 0 </reserved5>
- <reserved4> 0 </reserved4>
- <reserved3> 0 </reserved3>
- <reserved2> 0 </reserved2>
- <reserved1> 0 </reserved1>
- <enabled> <true /> </enabled>
- <rect>
- <left>198</left>
- <top>140</top>
- <right>256</right>
- <bottom>162</bottom>
- </rect>
- <style>roundrect</style>
- <showName> <true /> </showName>
- <highlight> <false /> </highlight>
- <autoHighlight> <false /> </autoHighlight>
- <sharedHighlight> <true /> </sharedHighlight>
- <family>0</family>
- <titleWidth>0</titleWidth>
- <icon>0</icon>
- <textAlign>center</textAlign>
- <font>Chicago</font>
- <textSize>12</textSize>
- <textStyle>plain</textStyle>
- <name>Hide</name>
- <script>on mouseUp
- HideProgressWindoid
- end mouseUp
- </script>
- </part>
- <part>
- <id>24</id>
- <type>button</type>
- <visible> <true /> </visible>
- <reserved5> 0 </reserved5>
- <reserved4> 0 </reserved4>
- <reserved3> 0 </reserved3>
- <reserved2> 0 </reserved2>
- <reserved1> 0 </reserved1>
- <enabled> <true /> </enabled>
- <rect>
- <left>118</left>
- <top>140</top>
- <right>176</right>
- <bottom>162</bottom>
- </rect>
- <style>roundrect</style>
- <showName> <true /> </showName>
- <highlight> <false /> </highlight>
- <autoHighlight> <false /> </autoHighlight>
- <sharedHighlight> <true /> </sharedHighlight>
- <family>0</family>
- <titleWidth>0</titleWidth>
- <icon>0</icon>
- <textAlign>center</textAlign>
- <font>Chicago</font>
- <textSize>12</textSize>
- <textStyle>plain</textStyle>
- <name>Create</name>
- <script>on mouseUp
- CreateProgressWindoid
- end mouseUp
- </script>
- </part>
- <part>
- <id>55</id>
- <type>button</type>
- <visible> <true /> </visible>
- <reserved5> 0 </reserved5>
- <reserved4> 0 </reserved4>
- <reserved3> 0 </reserved3>
- <reserved2> 0 </reserved2>
- <reserved1> 0 </reserved1>
- <enabled> <true /> </enabled>
- <rect>
- <left>344</left>
- <top>184</top>
- <right>385</right>
- <bottom>199</bottom>
- </rect>
- <style>shadow</style>
- <showName> <true /> </showName>
- <highlight> <false /> </highlight>
- <autoHighlight> <false /> </autoHighlight>
- <sharedHighlight> <true /> </sharedHighlight>
- <family>0</family>
- <titleWidth>0</titleWidth>
- <icon>0</icon>
- <textAlign>center</textAlign>
- <font>Chicago</font>
- <textSize>12</textSize>
- <textStyle>plain</textStyle>
- <name>Get</name>
- <script>on mouseUp
- GetProgWindowLoc
- end mouseUp
- </script>
- </part>
- <part>
- <id>62</id>
- <type>field</type>
- <visible> <true /> </visible>
- <dontWrap> <false /> </dontWrap>
- <dontSearch> <false /> </dontSearch>
- <sharedText> <false /> </sharedText>
- <fixedLineHeight> <true /> </fixedLineHeight>
- <autoTab> <false /> </autoTab>
- <lockText> <false /> </lockText>
- <rect>
- <left>118</left>
- <top>232</top>
- <right>342</right>
- <bottom>245</bottom>
- </rect>
- <style>rectangle</style>
- <autoSelect> <false /> </autoSelect>
- <showLines> <false /> </showLines>
- <wideMargins> <false /> </wideMargins>
- <multipleLines> <false /> </multipleLines>
- <reservedFamily> 0 </reservedFamily>
- <titleWidth>0</titleWidth>
- <icon>0</icon>
- <textAlign>left</textAlign>
- <font>Geneva</font>
- <textSize>9</textSize>
- <textStyle>plain</textStyle>
- <textHeight>9</textHeight>
- <name>Width</name>
- <script></script>
- </part>
- <part>
- <id>64</id>
- <type>field</type>
- <visible> <true /> </visible>
- <dontWrap> <false /> </dontWrap>
- <dontSearch> <false /> </dontSearch>
- <sharedText> <false /> </sharedText>
- <fixedLineHeight> <true /> </fixedLineHeight>
- <autoTab> <false /> </autoTab>
- <lockText> <false /> </lockText>
- <rect>
- <left>118</left>
- <top>248</top>
- <right>342</right>
- <bottom>261</bottom>
- </rect>
- <style>rectangle</style>
- <autoSelect> <false /> </autoSelect>
- <showLines> <false /> </showLines>
- <wideMargins> <false /> </wideMargins>
- <multipleLines> <false /> </multipleLines>
- <reservedFamily> 0 </reservedFamily>
- <titleWidth>0</titleWidth>
- <icon>0</icon>
- <textAlign>left</textAlign>
- <font>Geneva</font>
- <textSize>9</textSize>
- <textStyle>plain</textStyle>
- <textHeight>9</textHeight>
- <name>TextFont</name>
- <script></script>
- </part>
- <part>
- <id>60</id>
- <type>button</type>
- <visible> <true /> </visible>
- <reserved5> 0 </reserved5>
- <reserved4> 0 </reserved4>
- <reserved3> 0 </reserved3>
- <reserved2> 0 </reserved2>
- <reserved1> 0 </reserved1>
- <enabled> <true /> </enabled>
- <rect>
- <left>358</left>
- <top>140</top>
- <right>416</right>
- <bottom>162</bottom>
- </rect>
- <style>roundrect</style>
- <showName> <true /> </showName>
- <highlight> <false /> </highlight>
- <autoHighlight> <false /> </autoHighlight>
- <sharedHighlight> <true /> </sharedHighlight>
- <family>0</family>
- <titleWidth>0</titleWidth>
- <icon>0</icon>
- <textAlign>center</textAlign>
- <font>Chicago</font>
- <textSize>12</textSize>
- <textStyle>plain</textStyle>
- <name>Close</name>
- <script>on mouseUp
- CloseProgressWindoid
- end mouseUp
- </script>
- </part>
- <part>
- <id>70</id>
- <type>button</type>
- <visible> <true /> </visible>
- <reserved5> 0 </reserved5>
- <reserved4> 0 </reserved4>
- <reserved3> 0 </reserved3>
- <reserved2> 0 </reserved2>
- <reserved1> 0 </reserved1>
- <enabled> <true /> </enabled>
- <rect>
- <left>387</left>
- <top>184</top>
- <right>428</right>
- <bottom>199</bottom>
- </rect>
- <style>shadow</style>
- <showName> <true /> </showName>
- <highlight> <false /> </highlight>
- <autoHighlight> <false /> </autoHighlight>
- <sharedHighlight> <true /> </sharedHighlight>
- <family>0</family>
- <titleWidth>0</titleWidth>
- <icon>0</icon>
- <textAlign>center</textAlign>
- <font>Chicago</font>
- <textSize>12</textSize>
- <textStyle>plain</textStyle>
- <name>Set</name>
- <script>on mouseUp
- SetProgWindowLoc
- end mouseUp
- </script>
- </part>
- <part>
- <id>71</id>
- <type>button</type>
- <visible> <true /> </visible>
- <reserved5> 0 </reserved5>
- <reserved4> 0 </reserved4>
- <reserved3> 0 </reserved3>
- <reserved2> 0 </reserved2>
- <reserved1> 0 </reserved1>
- <enabled> <true /> </enabled>
- <rect>
- <left>344</left>
- <top>200</top>
- <right>385</right>
- <bottom>215</bottom>
- </rect>
- <style>shadow</style>
- <showName> <true /> </showName>
- <highlight> <false /> </highlight>
- <autoHighlight> <false /> </autoHighlight>
- <sharedHighlight> <true /> </sharedHighlight>
- <family>0</family>
- <titleWidth>0</titleWidth>
- <icon>0</icon>
- <textAlign>center</textAlign>
- <font>Chicago</font>
- <textSize>12</textSize>
- <textStyle>plain</textStyle>
- <name>Get</name>
- <script>on mouseUp
- GetProgWindowText
- end mouseUp
- </script>
- </part>
- <part>
- <id>72</id>
- <type>button</type>
- <visible> <true /> </visible>
- <reserved5> 0 </reserved5>
- <reserved4> 0 </reserved4>
- <reserved3> 0 </reserved3>
- <reserved2> 0 </reserved2>
- <reserved1> 0 </reserved1>
- <enabled> <true /> </enabled>
- <rect>
- <left>344</left>
- <top>216</top>
- <right>385</right>
- <bottom>231</bottom>
- </rect>
- <style>shadow</style>
- <showName> <true /> </showName>
- <highlight> <false /> </highlight>
- <autoHighlight> <false /> </autoHighlight>
- <sharedHighlight> <true /> </sharedHighlight>
- <family>0</family>
- <titleWidth>0</titleWidth>
- <icon>0</icon>
- <textAlign>center</textAlign>
- <font>Chicago</font>
- <textSize>12</textSize>
- <textStyle>plain</textStyle>
- <name>Get</name>
- <script>on mouseUp
- GetProgWindowFraction
- end mouseUp
- </script>
- </part>
- <part>
- <id>73</id>
- <type>button</type>
- <visible> <true /> </visible>
- <reserved5> 0 </reserved5>
- <reserved4> 0 </reserved4>
- <reserved3> 0 </reserved3>
- <reserved2> 0 </reserved2>
- <reserved1> 0 </reserved1>
- <enabled> <true /> </enabled>
- <rect>
- <left>344</left>
- <top>232</top>
- <right>385</right>
- <bottom>247</bottom>
- </rect>
- <style>shadow</style>
- <showName> <true /> </showName>
- <highlight> <false /> </highlight>
- <autoHighlight> <false /> </autoHighlight>
- <sharedHighlight> <true /> </sharedHighlight>
- <family>0</family>
- <titleWidth>0</titleWidth>
- <icon>0</icon>
- <textAlign>center</textAlign>
- <font>Chicago</font>
- <textSize>12</textSize>
- <textStyle>plain</textStyle>
- <name>Get</name>
- <script>on mouseUp
- GetProgWindowWidth
- end mouseUp
- </script>
- </part>
- <part>
- <id>74</id>
- <type>button</type>
- <visible> <true /> </visible>
- <reserved5> 0 </reserved5>
- <reserved4> 0 </reserved4>
- <reserved3> 0 </reserved3>
- <reserved2> 0 </reserved2>
- <reserved1> 0 </reserved1>
- <enabled> <true /> </enabled>
- <rect>
- <left>344</left>
- <top>248</top>
- <right>385</right>
- <bottom>263</bottom>
- </rect>
- <style>shadow</style>
- <showName> <true /> </showName>
- <highlight> <false /> </highlight>
- <autoHighlight> <false /> </autoHighlight>
- <sharedHighlight> <true /> </sharedHighlight>
- <family>0</family>
- <titleWidth>0</titleWidth>
- <icon>0</icon>
- <textAlign>center</textAlign>
- <font>Chicago</font>
- <textSize>12</textSize>
- <textStyle>plain</textStyle>
- <name>Get</name>
- <script>on mouseUp
- GetProgWindowTextFont
- end mouseUp
- </script>
- </part>
- <part>
- <id>75</id>
- <type>button</type>
- <visible> <true /> </visible>
- <reserved5> 0 </reserved5>
- <reserved4> 0 </reserved4>
- <reserved3> 0 </reserved3>
- <reserved2> 0 </reserved2>
- <reserved1> 0 </reserved1>
- <enabled> <true /> </enabled>
- <rect>
- <left>344</left>
- <top>264</top>
- <right>385</right>
- <bottom>279</bottom>
- </rect>
- <style>shadow</style>
- <showName> <true /> </showName>
- <highlight> <false /> </highlight>
- <autoHighlight> <false /> </autoHighlight>
- <sharedHighlight> <true /> </sharedHighlight>
- <family>0</family>
- <titleWidth>0</titleWidth>
- <icon>0</icon>
- <textAlign>center</textAlign>
- <font>Chicago</font>
- <textSize>12</textSize>
- <textStyle>plain</textStyle>
- <name>Get</name>
- <script>on mouseUp
- GetProgWindowTextSize
- end mouseUp
- </script>
- </part>
- <part>
- <id>81</id>
- <type>button</type>
- <visible> <true /> </visible>
- <reserved5> 0 </reserved5>
- <reserved4> 0 </reserved4>
- <reserved3> 0 </reserved3>
- <reserved2> 0 </reserved2>
- <reserved1> 0 </reserved1>
- <enabled> <true /> </enabled>
- <rect>
- <left>387</left>
- <top>200</top>
- <right>428</right>
- <bottom>215</bottom>
- </rect>
- <style>shadow</style>
- <showName> <true /> </showName>
- <highlight> <false /> </highlight>
- <autoHighlight> <false /> </autoHighlight>
- <sharedHighlight> <true /> </sharedHighlight>
- <family>0</family>
- <titleWidth>0</titleWidth>
- <icon>0</icon>
- <textAlign>center</textAlign>
- <font>Chicago</font>
- <textSize>12</textSize>
- <textStyle>plain</textStyle>
- <name>Set</name>
- <script>on mouseUp
- SetProgWindowText
- end mouseUp
- </script>
- </part>
- <part>
- <id>82</id>
- <type>button</type>
- <visible> <true /> </visible>
- <reserved5> 0 </reserved5>
- <reserved4> 0 </reserved4>
- <reserved3> 0 </reserved3>
- <reserved2> 0 </reserved2>
- <reserved1> 0 </reserved1>
- <enabled> <true /> </enabled>
- <rect>
- <left>387</left>
- <top>216</top>
- <right>428</right>
- <bottom>231</bottom>
- </rect>
- <style>shadow</style>
- <showName> <true /> </showName>
- <highlight> <false /> </highlight>
- <autoHighlight> <false /> </autoHighlight>
- <sharedHighlight> <true /> </sharedHighlight>
- <family>0</family>
- <titleWidth>0</titleWidth>
- <icon>0</icon>
- <textAlign>center</textAlign>
- <font>Chicago</font>
- <textSize>12</textSize>
- <textStyle>plain</textStyle>
- <name>Set</name>
- <script>on mouseUp
- SetProgWindowFraction
- end mouseUp
- </script>
- </part>
- <part>
- <id>83</id>
- <type>button</type>
- <visible> <true /> </visible>
- <reserved5> 0 </reserved5>
- <reserved4> 0 </reserved4>
- <reserved3> 0 </reserved3>
- <reserved2> 0 </reserved2>
- <reserved1> 0 </reserved1>
- <enabled> <true /> </enabled>
- <rect>
- <left>387</left>
- <top>232</top>
- <right>428</right>
- <bottom>247</bottom>
- </rect>
- <style>shadow</style>
- <showName> <true /> </showName>
- <highlight> <false /> </highlight>
- <autoHighlight> <false /> </autoHighlight>
- <sharedHighlight> <true /> </sharedHighlight>
- <family>0</family>
- <titleWidth>0</titleWidth>
- <icon>0</icon>
- <textAlign>center</textAlign>
- <font>Chicago</font>
- <textSize>12</textSize>
- <textStyle>plain</textStyle>
- <name>Set</name>
- <script>on mouseUp
- SetProgWindowWidth
- end mouseUp
- </script>
- </part>
- <part>
- <id>84</id>
- <type>button</type>
- <visible> <true /> </visible>
- <reserved5> 0 </reserved5>
- <reserved4> 0 </reserved4>
- <reserved3> 0 </reserved3>
- <reserved2> 0 </reserved2>
- <reserved1> 0 </reserved1>
- <enabled> <true /> </enabled>
- <rect>
- <left>387</left>
- <top>248</top>
- <right>428</right>
- <bottom>263</bottom>
- </rect>
- <style>shadow</style>
- <showName> <true /> </showName>
- <highlight> <false /> </highlight>
- <autoHighlight> <false /> </autoHighlight>
- <sharedHighlight> <true /> </sharedHighlight>
- <family>0</family>
- <titleWidth>0</titleWidth>
- <icon>0</icon>
- <textAlign>center</textAlign>
- <font>Chicago</font>
- <textSize>12</textSize>
- <textStyle>plain</textStyle>
- <name>Set</name>
- <script>on mouseUp
- SetProgWindowTextFont
- end mouseUp
- </script>
- </part>
- <part>
- <id>85</id>
- <type>button</type>
- <visible> <true /> </visible>
- <reserved5> 0 </reserved5>
- <reserved4> 0 </reserved4>
- <reserved3> 0 </reserved3>
- <reserved2> 0 </reserved2>
- <reserved1> 0 </reserved1>
- <enabled> <true /> </enabled>
- <rect>
- <left>387</left>
- <top>264</top>
- <right>428</right>
- <bottom>279</bottom>
- </rect>
- <style>shadow</style>
- <showName> <true /> </showName>
- <highlight> <false /> </highlight>
- <autoHighlight> <false /> </autoHighlight>
- <sharedHighlight> <true /> </sharedHighlight>
- <family>0</family>
- <titleWidth>0</titleWidth>
- <icon>0</icon>
- <textAlign>center</textAlign>
- <font>Chicago</font>
- <textSize>12</textSize>
- <textStyle>plain</textStyle>
- <name>Set</name>
- <script>on mouseUp
- SetProgWindowTextSize
- end mouseUp
- </script>
- </part>
- <part>
- <id>89</id>
- <type>field</type>
- <visible> <true /> </visible>
- <dontWrap> <false /> </dontWrap>
- <dontSearch> <false /> </dontSearch>
- <sharedText> <false /> </sharedText>
- <fixedLineHeight> <true /> </fixedLineHeight>
- <autoTab> <false /> </autoTab>
- <lockText> <false /> </lockText>
- <rect>
- <left>118</left>
- <top>264</top>
- <right>342</right>
- <bottom>277</bottom>
- </rect>
- <style>rectangle</style>
- <autoSelect> <false /> </autoSelect>
- <showLines> <false /> </showLines>
- <wideMargins> <false /> </wideMargins>
- <multipleLines> <false /> </multipleLines>
- <reservedFamily> 0 </reservedFamily>
- <titleWidth>0</titleWidth>
- <icon>0</icon>
- <textAlign>left</textAlign>
- <font>Geneva</font>
- <textSize>9</textSize>
- <textStyle>plain</textStyle>
- <textHeight>9</textHeight>
- <name>TextSize</name>
- <script></script>
- </part>
- <part>
- <id>90</id>
- <type>field</type>
- <visible> <true /> </visible>
- <dontWrap> <false /> </dontWrap>
- <dontSearch> <false /> </dontSearch>
- <sharedText> <false /> </sharedText>
- <fixedLineHeight> <true /> </fixedLineHeight>
- <autoTab> <false /> </autoTab>
- <lockText> <false /> </lockText>
- <rect>
- <left>209</left>
- <top>305</top>
- <right>252</right>
- <bottom>318</bottom>
- </rect>
- <style>rectangle</style>
- <autoSelect> <false /> </autoSelect>
- <showLines> <false /> </showLines>
- <wideMargins> <false /> </wideMargins>
- <multipleLines> <false /> </multipleLines>
- <reservedFamily> 0 </reservedFamily>
- <titleWidth>0</titleWidth>
- <icon>0</icon>
- <textAlign>left</textAlign>
- <font>Geneva</font>
- <textSize>9</textSize>
- <textStyle>plain</textStyle>
- <textHeight>9</textHeight>
- <name>Max Count</name>
- <script></script>
- </part>
- <content>
- <layer>card</layer>
- <id>19</id>
- <text>MaxCount:</text>
- </content>
- <content>
- <layer>card</layer>
- <id>20</id>
- <text>Loc:</text>
- </content>
- <content>
- <layer>card</layer>
- <id>30</id>
- <text>Fraction:</text>
- </content>
- <content>
- <layer>background</layer>
- <id>16</id>
- <text>Card 1 of 2</text>
- </content>
- <content>
- <layer>card</layer>
- <id>41</id>
- <text>Text:</text>
- </content>
- <content>
- <layer>card</layer>
- <id>45</id>
- <text>WindowName:</text>
- </content>
- <content>
- <layer>card</layer>
- <id>44</id>
- <text>ProgressWindow</text>
- </content>
- <content>
- <layer>card</layer>
- <id>28</id>
- <text>28,21</text>
- </content>
- <content>
- <layer>card</layer>
- <id>61</id>
- <text>Width:</text>
- </content>
- <content>
- <layer>card</layer>
- <id>63</id>
- <text>TextFont:</text>
- </content>
- <content>
- <layer>card</layer>
- <id>65</id>
- <text>TextSize:</text>
- </content>
- <content>
- <layer>card</layer>
- <id>62</id>
- <text>300</text>
- </content>
- <content>
- <layer>card</layer>
- <id>89</id>
- <text>14</text>
- </content>
- <content>
- <layer>card</layer>
- <id>90</id>
- <text>100</text>
- </content>
- <content>
- <layer>background</layer>
- <id>19</id>
- <text>ProgressWindoid XFCN
- Args: WindowName, Loc, [Width, Text, Fraction, TextFont, TextSize]</text>
- </content>
- <content>
- <layer>background</layer>
- <id>20</id>
- <text><span class="style2">This HyperCard external window command creates a windoid that can be used
- to show progress of a lengthy operation.
-
- The XFCN is called once and if successful, leaves an XWindoid which
- HyperCard will subsequently manage. A successful call is indicated
- by an empty return value from the XFCN. If the return value is not
- empty, then it should be interpreted as an error message.
-
- All interaction with the window takes place by getting and setting
- its properties (see below) and through HyperCard’s open, close, show,
- and hide commands.
-
- The WindowName argument is the name that the window will be given. It
- is required. After creating the window, this name will be used from
- HyperTalk to refer to it.
-
- The Loc argument is the point that will become the upper-left corner
- of the windoid. It is a two-item string in the form “20,50”. It is
- a card-relative number, not screen relative. It is required.
-
- The optional Width argument is total width of the windoid in pixels. The
- minimum width is 140 pixels. The maximum is 1200 pixels. The default
- is 250 pixels.
-
- The optional Text argument is the text that appears above the
- progress bar in the windoid. It may be empty. It defaults to “Progress:”.
-
- The optional Fraction argument is the Fraction that the XWindoid
- starts with when it is created. It is a floating point number between
- 0.0 and 1.0. It defaults to 0.0.
-
- The optional TextFont argument is the font that will be used for the text
- in the windoid. The name of the font (e.g. “Helvetica”) is used to specify
- the font. The default font is whatever font corresponds to 0 on the current
- system (usually Geneva).
-
- The optional TextSize argument is the size of the text in the window. It
- is 12 by default. The minimum size is 1 point and the maximum size is 127
- points.
-
- All of the optional arguments correspond to HyperCard properties of the
- windoid. These are: the width, the text, the fraction, the textFont, and
- the textSize.
-
- In addition to these special properties, the windoid also supports
- HyperCard’s standard window properties: the loc, the visible, and the
- properties (which returns a list of the special properties of the windoid).</span><span class="style3"></span></text>
- </content>
- <content>
- <layer>card</layer>
- <id>29</id>
- <text>.78</text>
- </content>
- <content>
- <layer>card</layer>
- <id>64</id>
- <text>Helvetica</text>
- </content>
- <content>
- <layer>card</layer>
- <id>40</id>
- <text>Making Progress!!</text>
- </content>
- <name></name>
- <script>•••••• ProgressWindoid Test Drive Card ••••••
- ••••••
- •••••• The code on this card is not general-purpose.
- •••••• It simply drives the interface which allows for quick
- •••••• testing of the ProgressWindoid XFCN.
- ••••••
- •••••• For a Package to manage ProgressWindoids, see the next card.
-
- •••••• Creating ••••••
-
- on CreateProgressWindoid
- put card field "Window Name" into WindowName
-
- if there is a window WindowName then
- answer "There is a already a window named" && WindowName && "."
- exit CreateProgressWindoid
- end if
-
- put card field "Loc" into InitialLoc
- put card field "Width" into InitialWidth
- put card field "Text" into InitialText
- put card field "Fraction" into InitialFraction
- put card field "TextFont" into InitialTextFont
- put card field "TextSize" into InitialTextSize
-
- put ProgressWindoid(¬
- WindowName, ¬
- InitialLoc, ¬
- InitialWidth, ¬
- InitialText, ¬
- InitialFraction, ¬
- InitialTextFont, ¬
- InitialTextSize) into XFCNResult
-
- if "•" is in XFCNResult then
- put XFCNResult into ErrorMessage
- answer ErrorMessage
- exit CreateProgressWindoid
- end if
-
- show window WindowName
- end CreateProgressWindoid
-
- •••••• Showing, Hiding, Closing ••••••
-
- on ShowProgressWindoid
- put card field "Window Name" into WindowName
- show window WindowName
- end ShowProgressWindoid
-
- on HideProgressWindoid
- put card field "Window Name" into WindowName
- hide window WindowName
- end HideProgressWindoid
-
- on CloseProgressWindoid
- put card field "Window Name" into WindowName
- close window WindowName
- end CloseProgressWindoid
-
- •••••• Getting properties ••••••
-
- on GetProgWindowLoc
- put card field "Window Name" into WindowName
- put the loc of window WindowName into card field "Loc"
- end GetProgWindowLoc
-
- on GetProgWindowText
- put card field "Window Name" into WindowName
- put the text of window WindowName into card field "Text"
- end GetProgWindowText
-
- on GetProgWindowWidth
- put card field "Window Name" into WindowName
- put the width of window WindowName into card field "Width"
- end GetProgWindowWidth
-
- on GetProgWindowFraction
- put card field "Window Name" into WindowName
- put the fraction of window WindowName into card field "Fraction"
- end GetProgWindowFraction
-
- on GetProgWindowTextSize
- put card field "Window Name" into WindowName
- put the textSize of window WindowName into card field "TextSize"
- end GetProgWindowTextSize
-
- on GetProgWindowTextFont
- put card field "Window Name" into WindowName
- put the textFont of window WindowName into card field "TextFont"
- end GetProgWindowTextFont
-
- •••••• Setting properties ••••••
-
- on SetProgWindowLoc
- put card field "Window Name" into WindowName
- if card field "Loc" is a point
- then set the loc of window WindowName to card field "Loc"
- end SetProgWindowLoc
-
- on SetProgWindowText
- put card field "Window Name" into WindowName
- set the text of window WindowName to card field "Text"
- end SetProgWindowText
-
- on SetProgWindowWidth
- put card field "Window Name" into WindowName
- set the width of window WindowName to card field "Width"
- end SetProgWindowWidth
-
- on SetProgWindowFraction
- put card field "Window Name" into WindowName
- set the fraction of window WindowName to card field "Fraction"
- end SetProgWindowFraction
-
- on SetProgWindowTextSize
- put card field "Window Name" into WindowName
- set the textSize of window WindowName to card field "TextSize"
- end SetProgWindowTextSize
-
- on SetProgWindowTextFont
- put card field "Window Name" into WindowName
- set the textFont of window WindowName to card field "TextFont"
- end SetProgWindowTextFont
-
- •••••• Tests ••••••
-
- •• Run a simple loop ••
- on TestProgressWindoidLoop
- put card field "Window Name" into WindowName
- put card field "Max Count" into MaxCount
- repeat with Count = 1 to MaxCount
- set the text of window WindowName to Count && "of" && MaxCount
- set the fraction of window WindowName to Count/MaxCount
- end repeat
- end TestProgressWindoidLoop
-
- •• Track mouse’s horizontal position on the card ••
-
- on TestProgressWindoidMouse
- put card field "Window Name" into WindowName
- put card field "Max Count" into MaxCount
- put the text of window WindowName into OldText
- put the fraction of window WindowName into OldFraction
- set cursor to crosshair
- set the text of window WindowName to "Tracking Mouse:"
- repeat until the mouse is up
- set the fraction of window WindowName to the mouseH / the width of card window
- end repeat
- set the text of window WindowName to OldText
- set the fraction of window WindowName to OldFraction
- end TestProgressWindoidMouse
-
- </script>
- </card>
-
-
-